﻿<UserControl x:Class="Ausy.Silverlight.Survey.QuestionModule.ViewParts.QuestionView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	mc:Ignorable="d"             
    xmlns:prism="http://www.codeplex.com/prism">
    <Border BorderBrush="#FF2D2D2D" BorderThickness="0" Margin="10" CornerRadius="20" HorizontalAlignment="Center">
        <Border.Effect>
            <DropShadowEffect BlurRadius="21" Direction="-90" ShadowDepth="0"/>
        </Border.Effect>
        <Border.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="#FFFF4444" Offset="0"/>
                <GradientStop Color="#FFB9000A" Offset="1"/>
            </LinearGradientBrush>
        </Border.Background>
        <StackPanel x:Name="LayoutRoot" Orientation="Vertical" Margin="10,0" >
            <Grid VerticalAlignment="Top" Height="50" Margin="10,0,10,10">
                <Grid.Effect>
                    <DropShadowEffect BlurRadius="21" Direction="0" ShadowDepth="0" Opacity="0.5"/>
                </Grid.Effect>
                <Path Data="F1M835.17,227.183L835.17,278.155C835.17,284.783,840.543,290.156,847.17,290.156L847.17,290.156L1114.605,290.156C1121.233,290.156,1126.606,284.783,1126.606,278.155L1126.606,278.155L1126.606,227.183z" Stretch="Fill" Margin="10,0" UseLayoutRounding="False" VerticalAlignment="Center">
                    <Path.Fill>
                        <LinearGradientBrush EndPoint="0.5,0.292" StartPoint="0.5,1.281">
                            <GradientStop Color="#FFFF4444" Offset="0"/>
                            <GradientStop Color="#FFB9000A" Offset="1"/>
                        </LinearGradientBrush>
                    </Path.Fill>
                </Path>
                <TextBlock Text="{Binding Text}"  Style="{StaticResource TitleTextBlockStyle}" Margin="20,0"/>
            </Grid>

            <ItemsControl Grid.Row="1" ItemsSource="{Binding AnswerViewModelCollection}"  Margin="20,40,20,40" IsEnabled="{Binding EnabledQuestion}">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <ContentControl HorizontalContentAlignment="Center" VerticalContentAlignment="Stretch" Content="{Binding View}" />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
            <Button Content="Suivant" prism:Click.Command="{Binding ValidateCommand}"  Style="{StaticResource DefaultButtonStyle}" Width="155"/>
        </StackPanel>
    </Border>
</UserControl>
    